<template>
	<scroll-view class="scroll-Y" scroll-y="true" show-scrollbar="true">
		<view>
			<view class="wu" v-if="orderList.length==0">
				<image src="../../static/wu.png" style="width: 182px; height: 150px; " mode=""></image>
				<p>暂无数据</p>
			</view>
			<view class="dd" v-for="(time,index) in orderList">
				<view class="dd-top">
					<view class="dd-q">
						{{time.tms_order_sn}}
					</view>

					<view class="dd-p">
						是否配送：<zero-switch v-model="orderList[index].is_delivery" :showText="true" textOn="是"
							textOff="否"></zero-switch>
					</view>
				</view>
				<view class="dd-dd" @click="tzxx(time.id)">
					<p>应垫资金额：{{time.should_advance_amount}}</p>
					<p>配送费：{{time.delivery_amount}}</p>
					<p>大车费：{{time.freight_amount}}</p>
					<p>实际垫资金额：{{time.advance_amount}}</p>
					<p>地址：{{time.address}}</p>
				</view>

			</view>

			<view class="submit-btn">
				<view class="kk">
					配送费：
					<input type="text" v-model="amount" placeholder="请输入配送费用">
				</view>

				<button @click="confirm">确认</button>
			</view>


		</view>
	</scroll-view>
</template>

<script>
	export default {
		name: "need-delivery-order",
		props: {
			orderList: {
				type: Array,
				default: []
			},
		},
		data() {
			return {

			};
		},
		methods: {
			confirm() {
				let order = this.orderList;
				this.$emit('confirm', order);
			},
			close() {
				this.$emit('close');
			}

		}
	}
</script>

<style scoped>
	.kk {
		width: 90%;
		margin: 0 auto;
		padding-top: 10px;
		display: flex;
		align-items: center;
	}

	.kk>input {}

	button {
		margin-top: 30px;
		width: 90%;
		height: 50px;
		background: #1890FF;
		box-shadow: 0px 0px 4px 0px rgba(204, 204, 204, 0.5);
		border-radius: 25px;


		font-size: 18px;
		font-weight: 600;
		color: #FFFFFF;
	}

	.wu {
		width: 100%;
		text-align: center;
		padding-top: 60px;
		color: #999999;
		font-size: 18px;
		line-height: 40px;
	}

	.dd {
		width: 100%;
		padding-bottom: 10px;
		margin-bottom: 10px;
		background: #FFFFFF;
		box-shadow: 0px 0px 6px 0px rgba(204, 204, 204, 0.5);
	}

	.dd-top {
		width: 100%;
		display: flex;
		justify-content: space-between;
		border-bottom: 1px dashed #CCCCCC;
	}

	.dd-q {
		font-size: 18px;
		font-weight: 500;
		margin-left: 20px;
		line-height: 50px;

	}

	.dd-p {
		font-size: 18px;
		line-height: 50px;
		margin-right: 20px;
		color: #0ACF00;
		font-weight: 600;
		display: flex;
		align-items: center;
	}

	.dd-dd {
		overflow: hidden;
		width: 90%;
		margin: 0 auto;
	}

	.dd-dd>p {
		line-height: 40px;
		float: left;
		width: 50%;
		font-size: 16px;
		font-weight: 400;
	}

	.scroll-Y {
		height: 76%;
	}

	.submit-btn {
		position: fixed;
		bottom: 0rpx;
		width: 100%;
		padding-bottom: 20rpx;
	}
</style>
